package com.yhstudio.designPattern.templateMethod;

public abstract class AbstractMediaSite {
    public void play() {
        if(checkSite() && initSite()) {
            System.out.println("play ...");
        }else {
            System.out.println("site play error ...");
        }
    }

    public abstract boolean checkSite();

    public abstract boolean initSite();

    public void close() {
        System.out.println("close ...");
    }
}
